#ifndef RTACCEPTORTCP_H
#define RTACCEPTORTCP_H

#include "RtAcceptorBase.h"
#include "RtSocket.h"

class /* */ CRtAcceptorTcp 
	: public CRtAcceptorBase
	, public IRtEventHandler
{
public:
	CRtAcceptorTcp();
	virtual ~CRtAcceptorTcp();
	
	// interface IRtAcceptor
	virtual RtResult StartListen(
		IRtAcceptorConnectorSink *aSink,
		const CRtInetAddr &aAddrListen);
	virtual RtResult StopListen(RtResult aReason);

	// iterface IRtEventHandler
	virtual RT_HANDLE GetHandle() const ;
	virtual int OnInput(RT_HANDLE aFd = RT_INVALID_HANDLE);
	virtual int OnClose(RT_HANDLE aFd, MASK aMask);

private:
	CRtSocketStream m_Socket;
};

#endif // !RTACCEPTORTCP_H
